/**
 * 北谷信息科技（广州）有限公司拥有本软件所有版权 © 2022，并保留所有权利。
 * Copyright © 2022, North Valley Information Technology (Guangzhou) Company
 * Limited, All Rights Reserved.
 */

package main.com.scrapy.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * TODO: 给出类和接口说明
 *
 * @author Double
 * <p><b>Creation Time:</b> 2022/9/19 16:29</p>
 * @since scrapy-1688
 */
public class JsonUtil {

  private static final Logger logger = LoggerFactory.getLogger(JsonUtil.class);


  public static List<String> getJsonResult(String data, String regex) {
    Pattern pattern = Pattern.compile(regex);
    Matcher matcher = pattern.matcher(data);
    List<String> tempList = new ArrayList<>();
    while (matcher.find()) {
      tempList.add(matcher.group());
    }
    return tempList;
  }
}
